home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sources / xman / defs.h < prev    next >
C/C++ Source or Header  |  1994-09-27  |  4KB  |  114 lines

  1. /*
  2.  * xman - X window system manual page display program.
  3.  *
  4.  * $XConsortium: defs.h,v 1.24 91/02/13 16:08:07 converse Exp $
  5.  *
  6.  * Copyright 1987, 1988 Massachusetts Institute of Technology
  7.  *
  8.  * Permission to use, copy, modify, and distribute this software and its
  9.  * documentation for any purpose and without fee is hereby granted, provided
  10.  * that the above copyright notice appear in all copies and that both that
  11.  * copyright notice and this permission notice appear in supporting
  12.  * documentation, and that the name of M.I.T. not be used in advertising or
  13.  * publicity pertaining to distribution of the software without specific,
  14.  * written prior permission.  M.I.T. makes no representations about the
  15.  * suitability of this software for any purpose.  It is provided "as is"
  16.  * without express or implied warranty.
  17.  *
  18.  * Author:    Chris D. Peterson, MIT Project Athena
  19.  * Created:   October 22, 1987
  20.  */
  21.  
  22. #ifndef HELPFILE
  23. #define HELPFILE "/usr/lib/X11/xman.help" /* name of the default helpfile. */ 
  24. #endif
  25.  
  26. /* The default cursors */
  27.  
  28. #define XMAN_CURSOR "left_ptr"        /* Top level cursor. */
  29. #define HELP_CURSOR "left_ptr"            /* The help cursor. */
  30. #define MANPAGE_CURSOR "left_ptr"    /* The manpage cursor. */
  31. #define SEARCH_ENTRY_CURSOR "question_arrow"    /* The search text widget
  32.                            cursor. */
  33. #define DIRECTORY_NORMAL "fixed" /* The default dir font */
  34.  
  35. #define OPTION_MENU "optionMenu" /* Name of the Option Menu. */
  36. #define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */
  37.  
  38. #define HELP_BUTTON "helpButton" /* Name of top help button */
  39. #define QUIT_BUTTON "quitButton" /* Name of top quit button */
  40. #define MANPAGE_BUTTON "manpageButton" /* Name of top manpage button */
  41.  
  42. #define TOPBOXNAME  "topBox"    /* Name of the Top Box. */
  43. #define MANNAME "manualBrowser"    /* name for each manual page widget. */
  44. #define SEARCHNAME "search" /* The name for the search widget. */
  45. #define HELPNAME  "help"    /* The name of the help widget. */
  46. #define DIRECTORY_NAME "directory" /* name of the directory widget. */
  47. #define MANUALPAGE "manualPage"    /* name of the Scrollbyline widget that
  48.                  contains the man page. */
  49. #define DIALOG         "dialog"
  50.  
  51. /* Names of the menu buttons */
  52.  
  53. #define NUM_OPTIONS 9        /* Number of menu options. */
  54.  
  55. #define DIRECTORY      "displayDirectory"
  56. #define MANPAGE        "displayManualPage"
  57. #define HELP           "help"
  58. #define SEARCH         "search"
  59. #define BOTH_SCREENS   "showBothScreens"
  60. #define REMOVE_MANPAGE "removeThisManpage"
  61. #define OPEN_MANPAGE   "openNewManpage"
  62. #define SHOW_VERSION   "showVersion"
  63. #define QUIT           "quit"
  64.  
  65. /* definitions of string to use for show both and show one. */
  66.  
  67. #define SHOW_BOTH "Show Both Screens"
  68. #define SHOW_ONE "Show One Screen"
  69.  
  70. /* 
  71.  * Things will not look right if you change these names to make 
  72.  * MANUALSEARCH longer APROPOSSEARCH, see search.c for details.
  73.  */
  74.  
  75. #define MANUALSEARCH "manualPage"
  76. #define APROPOSSEARCH "apropos"
  77. #define CANCEL "cancel"
  78.  
  79. #define MANUAL 0
  80. #define APROPOS 1
  81.  
  82. #define NO_SECTION_DEFAULTS ("no default sections")
  83.  
  84. #define TBL "tbl"
  85.  
  86. #define DEFAULT_WIDTH 500    /* The default width of xman. */
  87. #define SECTALLOC  8        /* The number of entries allocated
  88.                    at a time for the manual structures. */
  89. #define ENTRYALLOC 100        /* The number of entries allocated
  90.                    at a time for a section. */
  91.  
  92. #define INITIAL_DIR 0        /* The Initial Directory displayed. */
  93.  
  94. #define COPY "cp"        /* copy command */
  95. #define CHMOD_MODE 00666    /* permissions set on saved formatted files */
  96. #define MANDESC "mandesc"    /* name of the mandesc files */
  97.  
  98. #define INDENT 15
  99. #define TYP20STR "MMMMMMMMMMMMMMMMMMMM"
  100.  
  101. #define FILE_SAVE "yes"
  102. #define CANCEL_FILE_SAVE "no"
  103. #define MANTEMP "/tmp/xmanXXXXXX"
  104.  
  105. /*
  106.  * Macro Definitions.
  107.  */
  108.  
  109. #define streq(a, b)        ( strcmp((a), (b)) == 0 )
  110.  
  111. /* 
  112.  * Function definitions moved to man.h
  113.  */
  114.